package com.approval.entity;

import lombok.Data;

import java.util.Date;

/**
 * 密码策略实体
 */
@Data
public class PasswordPolicy {
    
    private Long id;
    
    /**
     * 策略名称
     */
    private String policyName;
    
    /**
     * 最小长度
     */
    private Integer minLength = 8;
    
    /**
     * 最大长度
     */
    private Integer maxLength = 20;
    
    /**
     * 需要大写字母
     */
    private Boolean requireUppercase = true;
    
    /**
     * 需要小写字母
     */
    private Boolean requireLowercase = true;
    
    /**
     * 需要数字
     */
    private Boolean requireDigits = true;
    
    /**
     * 需要特殊字符
     */
    private Boolean requireSpecialChars = true;
    
    /**
     * 密码历史记录数量
     */
    private Integer passwordHistoryCount = 5;
    
    /**
     * 密码过期天数
     */
    private Integer passwordExpireDays = 90;
    
    /**
     * 最大登录尝试次数
     */
    private Integer maxLoginAttempts = 5;
    
    /**
     * 锁定持续时间（分钟）
     */
    private Integer lockoutDurationMinutes = 30;
    
    /**
     * 状态（1-启用，0-禁用）
     */
    private Integer status = 1;
    
    /**
     * 创建时间
     */
    private Date createTime;
    
    /**
     * 更新时间
     */
    private Date updateTime;
    
    // Getter and Setter methods
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getPolicyName() {
        return policyName;
    }

    public void setPolicyName(String policyName) {
        this.policyName = policyName;
    }

    public Integer getMinLength() {
        return minLength;
    }

    public void setMinLength(Integer minLength) {
        this.minLength = minLength;
    }

    public Integer getMaxLength() {
        return maxLength;
    }

    public void setMaxLength(Integer maxLength) {
        this.maxLength = maxLength;
    }

    public Boolean getRequireUppercase() {
        return requireUppercase;
    }

    public void setRequireUppercase(Boolean requireUppercase) {
        this.requireUppercase = requireUppercase;
    }

    public Boolean getRequireLowercase() {
        return requireLowercase;
    }

    public void setRequireLowercase(Boolean requireLowercase) {
        this.requireLowercase = requireLowercase;
    }

    public Boolean getRequireDigits() {
        return requireDigits;
    }

    public void setRequireDigits(Boolean requireDigits) {
        this.requireDigits = requireDigits;
    }

    public Boolean getRequireSpecialChars() {
        return requireSpecialChars;
    }

    public void setRequireSpecialChars(Boolean requireSpecialChars) {
        this.requireSpecialChars = requireSpecialChars;
    }

    public Integer getPasswordHistoryCount() {
        return passwordHistoryCount;
    }

    public void setPasswordHistoryCount(Integer passwordHistoryCount) {
        this.passwordHistoryCount = passwordHistoryCount;
    }

    public Integer getPasswordExpireDays() {
        return passwordExpireDays;
    }

    public void setPasswordExpireDays(Integer passwordExpireDays) {
        this.passwordExpireDays = passwordExpireDays;
    }

    public Integer getMaxLoginAttempts() {
        return maxLoginAttempts;
    }

    public void setMaxLoginAttempts(Integer maxLoginAttempts) {
        this.maxLoginAttempts = maxLoginAttempts;
    }

    public Integer getLockoutDurationMinutes() {
        return lockoutDurationMinutes;
    }

    public void setLockoutDurationMinutes(Integer lockoutDurationMinutes) {
        this.lockoutDurationMinutes = lockoutDurationMinutes;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
}